
package com.yuhanginfo.modules.sys.entity;

import com.yuhanginfo.modules.sys.entity.User;
import org.hibernate.validator.constraints.Length;

import com.yuhanginfo.common.persistence.DataEntity;

/**
 * 地址管理Entity
 * @author lvls
 * @version 2017-11-22
 */
public class SysAddress extends DataEntity<SysAddress> {
	
	private static final long serialVersionUID = 1L;
	private User user;		// 用户id
	private String receive;		// 收件人
	private String phone;		// 联系方式
	private String province;		// 省
	private String city;		// 市
	private String area;		// 区
	private String address;		// 详细地址
	private String zipcode;		// 邮政编码
	private String isDef;		// 是否默认:0否,1是
	private String userId;
	private String provinceName;
	private String cityName;
	private String areaName;
	private String provinceCode;
	private String cityCode;
	private String areaCode;
	private String id;
	
	public SysAddress() {
		super();
	}


	public User getUser() {
		return user;
	}
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getProvinceName() {
		return provinceName;
	}

	public void setProvinceName(String provinceName) {
		this.provinceName = provinceName;
	}

	public String getCityName() {
		return cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}

	public String getAreaName() {
		return areaName;
	}

	public void setAreaName(String areaName) {
		this.areaName = areaName;
	}

	public String getProvinceCode() {
		return provinceCode;
	}

	public void setProvinceCode(String provinceCode) {
		this.provinceCode = provinceCode;
	}

	public String getCityCode() {
		return cityCode;
	}

	public void setCityCode(String cityCode) {
		this.cityCode = cityCode;
	}

	public String getAreaCode() {
		return areaCode;
	}

	public void setAreaCode(String areaCode) {
		this.areaCode = areaCode;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}



	public void setUser(User user) {
		this.user = user;
	}
	
	@Length(min=0, max=50, message="收件人长度必须介于 0 和 50 之间")
	public String getReceive() {
		return receive;
	}

	public void setReceive(String receive) {
		this.receive = receive;
	}
	
	@Length(min=0, max=13, message="联系方式长度必须介于 0 和 13 之间")
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	@Length(min=0, max=50, message="省长度必须介于 0 和 50 之间")
	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}
	
	@Length(min=0, max=50, message="市长度必须介于 0 和 50 之间")
	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}
	
	@Length(min=0, max=50, message="区长度必须介于 0 和 50 之间")
	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}
	
	@Length(min=0, max=255, message="详细地址长度必须介于 0 和 255 之间")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	@Length(min=0, max=10, message="邮政编码长度必须介于 0 和 10 之间")
	public String getZipcode() {
		return zipcode;
	}

	public void setZipcode(String zipcode) {
		this.zipcode = zipcode;
	}
	
	@Length(min=0, max=11, message="是否默认:0否,1是长度必须介于 0 和 11 之间")
	public String getIsDef() {
		return isDef;
	}

	public void setIsDef(String isDef) {
		this.isDef = isDef;
	}
	
}